package tc.serivce;


import cn.liyicun.test.TestApplication;
import cn.liyicun.test.bean.UserInfo;
import cn.liyicun.test.service.UserService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;


@RunWith(SpringRunner.class)
@SpringBootTest(classes = TestApplication.class)
public class UserSeriveTC {
    @Autowired
    UserService service;
    @Test
    public void addUserTC(){
        String ip="testtc";
        long id = service.addUser("11", "2222", "3333333", ip);
        System.out.println("-0000000----"+id);

    }

    @Test
    public void existUserNameTc(){
        long id = service.existUserName("11" );
        System.out.println("-0000000----"+id);
        long id1 = service.existUserName("12221" );
        System.out.println("-0000000----"+id1);

    }




    @Test
    public void queryByUserNameTC(){
        UserInfo id = service.queryByUserName("11" );
        System.out.println("-0000000----"+id);
        UserInfo id1 = service.queryByUserName("12221" );
        System.out.println("-0000000----"+id1);

    }





}
